FROM ubuntu:20.04

# 避免交互式配置
ENV DEBIAN_FRONTEND=noninteractive

# 安装Python3和pip
RUN apt-get update && \
    apt-get install -y python3 python3-pip && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 安装Python依赖
RUN pip3 install flask requests

# 复制应用代码
COPY src/ /app/

# 暴露端口
EXPOSE 9527 9528 9529

# 启动命令
CMD ["python3", "cache_server.py"]
